Copyright ã1995 by NeXT Computer, Inc.  All Rights Reserved.

NS_DEV_DOCFOR:objc_protocol:NXPrintingUserInterface;,NXPrintingUserInterface
(informal protocol)

Category Of:	Object

Declared In:	appkit/View.h

Category Description

This informal protocol consists of one method, shouldRunPrintPanel:, which is implemented by initiators of printing (and faxing) requests.  Its return value indicates whether the Print panel (or Fax panel) should be displayed to the user.

Instance Methods

NS_DEV_DOCFOR:objc_method:[NXPrintingUserInterface-shouldRunPrintPanel:];,shouldRunPrintPanel:

- (BOOL)shouldRunPrintPanel:aView

Implemented to indicate whether the Print panel (or Fax panel) should be run before printing (or faxing) begins.  Running the panel means placing it on-screen so the user can make choices about the print job, or possibly even cancel it.  Not running the panel means that the print job proceeds without user intervention.

Printing requests are initiated by sending a View or Window object a message to perform one of these two methods:

printPSCode:	(View and Window)
smartPrintPSCode:	(Window only)

Each method takes an id argument, which usually identifies the initiator of the print request (the object that sent the message).  A shouldRunPrintPanel: message is sent back to that object, if the object can respond to the message.  The aView argument identifies the View being printedÐthe View that received the printPSCode: message.  If a Window received the printPSCode: (or smartPrintPSCode:) message, aView is the frame view for the Window.

If shouldRunPrintPanel: returns YES, the Print panel is run before printing begins.  If it returns NO, the Print panel is not run, and the previous settings of the panel are used.  The Print panel is also run if this method is not implemented.

Requests to fax a View or a Window can be initiated (by users) from within the Print panel.  However, an application can bypass the Print panel using either of the following two methods, which parallel the printing methods listed above:

faxPSCode:	(View and Window)
smartFaxPSCode:	(Window only)

Like the printing methods, these methods each take an id argument, and that argument is sent a shouldRunPrintPanel: message if it can respond.  However, in this case, the value returned by shouldRunPrintPanel: indicates whether the Fax panel (not the Print panel) should be run.

There's no default implementation of the shouldRunPrintPanel: method.  The Application Kit declares a prototype for this method, but doesn't define it.  Therefore, there's no reason to implement this method just to return YES.  If it's not implemented, the print and fax panels will be run by default.

See also:  - printPSCode: (View and Window classes), - smartPrintPSCode: (Window class),  - faxPSCode: (View and Window classes), - smartFaxPSCode: (Window class)